package edu.hziee.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import edu.hziee.dao.ManagerCardDao;
import edu.hziee.models.ManagerCard;


@Controller
@RequestMapping("/managercard")
public class ManagerCardController {

	@Autowired
	private ManagerCardDao mcdao;
	
	
	@RequestMapping(value="/mclist",method=RequestMethod.GET)
	public ModelAndView getAll(){
		ModelAndView mav=new ModelAndView("managercard/mcList");
		List<ManagerCard> mcs = mcdao.findAll();
		mav.addObject("mcs",mcs);
		return mav;
	}
}
